//
//  UIImage+Convert.h
//  BlueToothProject
//
//  Created by Apple on 2016/12/6.
//  Copyright © 2016年 yxw. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <CoreBluetooth/CoreBluetooth.h>
@interface UIImage (Convert)
- (UIImage *)convertBitmap;
- (unsigned char *)pixelBRGABytes;
- (NSData *)convertUIImageToBitmapData;
- (unsigned char *)convertUIImageToBitmapRGBA8;
// 将图片压缩成指定大小
- (UIImage*)imageByScalingAndCroppingForSize:(CGSize)targetSize;

- (UIImage *)scaleToSize:(UIImage *)img size:(CGSize)size;


#pragma mark 转bmp
+ (unsigned char *)pixelBRGABytesFromImage:(UIImage *)image;
+ (UIImage *)imageFromBRGABytes:(unsigned char *)imageBytes imageSize:(CGSize)imageSize;
@end
